import qs from 'qs'
import request from '@/utils/request'

export const login = async params => {
  return await request({
    method: 'POST',
    header: {
      'content-type': 'application/x-www-form-urlencoded',
    },
    url: '/front/user/login',
    data: qs.stringify(params),
  })
}

export const getUserInfo = async () => {
  return await request({
    method: 'GET',
    url: '/front/user/getInfo',
  })
}

export const getUserPages = async data => {
  return await request({
    method: 'POST',
    url: '/boss/user/getUserPages',
    data: data,
  })
}
